﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zielonka.co.uk.extensions.system
{
    //Description:	Equivalent to Python's Join method:
    /*
        
    */

    public static partial class StringExtensions
    {
        /// <summary>
        /// same as python 'join'
        /// </summary>
        /// <typeparam name="T">list type</typeparam>
        /// <param name="separator">string separator </param>
        /// <param name="list">list of objects to be ToString'd</param>
        /// <returns>a concatenated list interleaved with separators</returns>
        static public string Join<T>(this string separator, IEnumerable<T> list)
        {
            return string.Join(separator, list.ToArray());
        }
    }
}
